package org.example.ReflectDemo.controller;

import lombok.extern.slf4j.Slf4j;
import org.example.ReflectDemo.aspect.TimeRecord;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RequestMapping("/user")
@RestController
public class UserController {
    @RequestMapping("/u1")
    public String u1() {
        log.info("执行 u1 方法");
        return "u1";
    }
    @TimeRecord
    @RequestMapping("/u2")
    public boolean u2() {
        log.info("执行 u2 方法");
        return true;
    }
}
